﻿using com.uplus.common;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using WebApi.Common;

namespace WebApi
{
    public class Program
    {
        public static void Main(string[] args)
        {
           //var str =  ShortUrl.ConvertToShortUrl("https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx2f3e4dde1019b63a&redirect_uri=http://uplus.uplussoft.com/index.html?bookingCode=&stationCode=00N4&response_type=code&scope=snsapi_userinfo&#wechat_redirect");
            CreateWebHostBuilder(args).Build().Run();
        }

        public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
            WebHost.CreateDefaultBuilder(args)
        //.UseUrls(AppConfigurtaion.GetSecondSection("Api", "api").ToString())//给程序启动设置url地址
        //.UseKestrel()//使用Kestrel内部服务器
        //.UseStartup<Startup>();
        .UseStartup<Startup>().UseKestrel();

    }
}
